<?php

use Fisharebest\Webtrees\Place;
use Fisharebest\Webtrees\I18N;

/**
 * @var bool   $showlink
 * @var Place  $place
 * @var string $flag
 * @var string $latitude
 * @var string $longitude
 */
?>
<div dir="auto" class="label">
    <?php if ($flag) : ?>
        <img class="flag mx-1 mr-1" alt = "<?=strip_tags($place->placeName()) ?>" title = "<?=strip_tags($place->placeName()) ?>" src='<?= $flag ?>'>
    <?php endif ?>
    <?php if ($showlink) : ?>
        <a href="<?= e($place->url()) ?>">
            <?= $place->placeName() ?>
        </a>
    <?php else : ?>
        <?= $place->placeName() ?>
    <?php endif ?>
    <table class="table table-borderless">
        <tr>
            <th scope="row" class="p-0"><?= I18N::translate('Latitude') ?></th>
            <td class="p-0 align-digits"><?= $latitude ?></td>
        </tr>
        <tr>
            <th scope="row" class="p-0"><?= I18N::translate('Longitude') ?></th>
            <td class="p-0 align-digits"><?= $longitude ?></td>
        </tr>
    </table>
</div>
